home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Atari Mega Archive 2
/
Atari Mega Archive CD - Volume 2.iso
/
8bit
/
cislib_a
/
breake.lst
< prev
next >
Wrap
File List
|
1995-04-22
|
935b
|
34 lines
1 REM FILE BREAKER-UPPER
2 REM By: Michael Reichmann 01/02/85
3 REM Simple demo program.
4 REM You need to know the number of
5 REM sectors in the file that you
6 REM want to break up. This is a
7 REM quick and dirty example of how
8 REM to break a larger file into
9 REM two smaller ones.
10 ? CHR$(125):TRAP 150:POSITION 15,2:? "-BREAKER-":?
11 DIM FILE$(12):LOOP=75
12 ? "Enter source file name,(D:...)"
14 INPUT FILE$:?
16 ? "Enter # of sectors in file."
18 INPUT SIZE:? :? "Creating FILE.1"
19 ? "Processing...":?
20 OPEN #1,4,0,FILE$
22 OPEN #2,8,0,"D:FILE.1"
25 GOSUB LOOP:? :? "Creating FILE.2":?
40 OPEN #2,8,0,"D:FILE.2"
45 GOSUB LOOP
50 CLOSE #1:? :? "Finished.":END
75 FOR X=1 TO (SIZE*125)/2
80 GET #1,BYTE
85 PUT #2,BYTE
88 ? CHR$(BYTE);
90 NEXT X
95 CLOSE #2:?
100 RETURN
150 IF PEEK(195)=136 THEN GOTO 50:REM End of file found.
155 CLOSE #1:CLOSE #2
160 ? "ABORTED TERMINATION"